import time

f = open("D:/python.txt", "r", encoding="UTF-8")
# print(type(f))
# print(f.read())

for line in f:
    print(f"每一行数据是:{line}")
time.sleep(2)
f.close()

with open("D:/python.txt", "r", encoding="UTF-8") as f:
    print(f.read())

fr = open("D:/python.txt", "r", encoding="UTF-8")
fw = open("D:/python2.txt", "w", encoding="UTF-8")
for line in fr:
    line = line.strip()
    # if line.split(",")[4] == "测试":
    #     continue
    fw.write(line)
    fw.write("\n")
fr.close()
fw.close()

try:
    1 / 0
except ZeroDivisionError as e:
    print(f"e{e}")

try:
    1 / 0
except Exception as e:
    print(e)
else:
    print(1)
finally:
    print(2)


def test(x, y):
    return x + y


if __name__ == '__main__':
    test(1, 2)

import first.module1

first.module1.test_print()

#pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
